<%--
  Created by IntelliJ IDEA.
  User: cnu
  Date: 2022/8/11
  Time: 13:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>文件上传test</title>
<%--    <script type="text/javascript" src="./js/jquery-1.7.2.js"/>--%>
</head>
<body>
<a href="index1.html">文件上传与下载功能</a>
</body>
<%--<body>
<form name="upload" action="upload" enctype="multipart/form-data" method="post">
    <input type="file" name="file" value="file" multiple="multiple"/>
    <button type="submit" name="submit" id="submit" value="上传">上传</button>
</form>
<form method="get" name="select" action="select">
    <input type="text" name="text" value="输入查询">
    <button type="submit" name="select" id="select" value="select">查询</button>
</form>
&lt;%&ndash;<div>${FileBean}</div>&ndash;%&gt;
<div id="showdata" name="showdata">数据展示</div>
<form name="1" enctype="text/plain"></form>
<form name="2" enctype="application/x-www-form-urlencoded"></form>
<a href="#">显示信息</a>
</body>--%>
<%--<script type="text/javascript">
    &lt;%&ndash;alert([${FileBean}]);&ndash;%&gt;
    &lt;%&ndash;let data =eval(${FileBean});&ndash;%&gt;
    var data1=Object(${FileBean});
    console.log(data1);
    var de = document.getElementById("showdata");
    console.log("result:" + data1[0].name);
    var th = "<tr><th>编号:</th> <th>文件名:</th> <th>文件类型:</th> <th>文件大小:</th> <th>文件预览：</th> </tr>";
    var tbody = "";
    for (var i = 0; i < data.length; i++) {
        var list1 = data[i];
        console.log(list1);
        tbody += "<tr><td>" + i + "</td>" + "<td>" + list1.name + "</td>" + "<td>" + list1.type + "</td>" + "<td>"
            + list1.size +"</td>"+"<td>"+list1.fileUrl+list1.type +"</td></tr>";
    }
    var tbody = "<div id='showtable' style='display: block'>" + tbody + "</div>";
    de.innerHTML = "<table >" + th + tbody + "</table>";

    function show() {
        var display = document.getElementById("showtable");
        if (display.style.display == "block") {
            display.style.display = "none";
        } else {
            display.style.display = "block";
        }
    }
</script>--%>
<%--<script type="text/javascript" src="./js/jquery-1.7.2.js"/>
<script type="text/javascript" >
    $(function (){
        $("a").toggle(function (){
            var url="select";
            $.get(url,function (data){
                var jsonObject=eval(data);
                console.log(jsonObject);

            })
        })
    })
</script>--%>
</html>

